package com.rnkrsoft.suyan.config.server.config.dao;

import com.rnkrsoft.framework.orm.Pagination;
import com.rnkrsoft.framework.orm.jdbc.JdbcMapper;
import com.rnkrsoft.suyan.config.server.config.bo.QueryAuthorityInfoBO;
import com.rnkrsoft.suyan.config.server.config.entity.AuthorityInfoEntity;
import org.apache.ibatis.annotations.Param;

/**
 * Created by woate on 2019/5/23.
 */
public interface AuthorityInfoDAO extends JdbcMapper<AuthorityInfoEntity, String> {
    Pagination<QueryAuthorityInfoBO> queryAuthority(Pagination<QueryAuthorityInfoBO> pagination);
    int hasAuthorityOnParam(@Param("paramId") String paramId, @Param("loginUserId") Integer loginUserId);
    int hasAuthorityOnMachine(@Param("machineId") String machineId, @Param("loginUserId") Integer loginUserId);
    int hasAuthorityOnEnvironment(@Param("environmentId") String environmentId, @Param("loginUserId") Integer loginUserId);
    int hasAuthorityOnVersion(@Param("versionId") String versionId, @Param("loginUserId") Integer loginUserId);
    int hasAuthorityOnProject(@Param("projectId") String projectId, @Param("loginUserId") Integer loginUserId);
}
